import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_hooks/flutter_hooks.dart';

class FormItem extends HookWidget {
  final String label;
  final Widget child;
  const FormItem({Key? key,required this.label,required this.child}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: const EdgeInsets.all(16),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Text(label,style: Theme.of(context).textTheme.titleMedium,),
          child,
        ],
      ),
    );
  }
}
